<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>基于 layui 的极简社区页面模版</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="keywords" content="fly,layui,前端社区">
    <meta name="description" content="Fly社区是模块化前端UI框架Layui的官网社区，致力于为web开发提供强劲动力">
    <link rel="stylesheet" href="/static/res/css/main.css">
    <link rel="stylesheet" href="/static/res/layui/css/layui.css">
    <link rel="stylesheet" href="/static/res/css/global.css">
    <link rel="stylesheet" href="/static/res/css/jquery.pagination.css">
</head>
<body>

<div class="fly-header layui-bg-black">
    <div class="layui-container">
        <a class="fly-logo" href="/">
            <img src="/static/res/images/logo.png" alt="layui">
        </a>

       <ul class="layui-nav fly-nav-user">
            {% if not user_id %}
                <!-- 未登入的状态 -->
                <li class="layui-nav-item">
                    <a class="iconfont icon-touxiang layui-hide-xs" href="passport/login"></a>
                </li>
                <li class="layui-nav-item">
                    <a href="/passport/login">登入</a>
                </li>
                <li class="layui-nav-item">
                    <a href="/passport/reg">注册</a>
                </li>
                <!-- 登入后的状态 -->
            {% else %}
                <li class="layui-nav-item">
                    <a class="fly-nav-avatar" href="javascript:;">
                        <cite class="layui-hide-xs">{{ user.nick_name }}</cite>
                        {% if not user.credentials %}
                            {#                <i class="iconfont icon-renzheng layui-hide-xs" title="认证信息：{{ user.credentials }}"></i>#}
                        {% else %}
                            <i class="iconfont icon-renzheng layui-hide-xs" title="认证信息：{{ user.credentials }}"></i>
                        {% endif %}
                        {% if user.vip_leven ==0 %}
                            {#                    <i class="layui-badge fly-badge-vip layui-hide-xs">VIP{{ user.vip_leven }}</i>#}
                        {% else %}
                            <i class="layui-badge fly-badge-vip layui-hide-xs">VIP{{ user.vip_leven }}</i>
                        {% endif %}
                        <img src="{{ user.avatar_url }}">
                    </a>
                    <dl class="layui-nav-child">
                        <dd><a href="/user/set"><i class="layui-icon">&#xe620;</i>基本设置</a></dd>
{#                        <dd><a href="/user/message"><i class="iconfont icon-tongzhi" style="top: 4px;"></i>我的消息</a>#}
{#                        </dd>#}
                        <dd><a href="/user/home"><i class="layui-icon" style="margin-left: 2px; font-size: 22px;">&#xe68e;</i>我的主页</a>
                        </dd>
                        <hr style="margin: 5px 0;">
                        <dd><a href="/passport/logout" style="text-align: center;">退出</a></dd>
                    </dl>
                </li>
            {% endif %}
        </ul>
    </div>
</div>

<div class="fly-panel fly-column">
    <div class="layui-container">
        <ul class="layui-clear">
            <li class="layui-hide-xs"><a href="/">首页</a></li>
            <li ><a href="/jie/index">提问</a></li>
            <li><a href="/jie/share">分享</a></li>
            <li><a href="/jie/discuss">讨论</a></li>
            <li><a href="/jie/suggest">建议</a></li>
            <li><a href="/jie/notice">公告</a></li>
            <li class="layui-this"><a href="/jie/dynamic">动态</a></li>
            <li class="layui-hide-xs layui-hide-sm layui-show-md-inline-block"><span class="fly-mid"></span></li>

            <!-- 用户登入后显示 -->
           <li class="layui-hide-xs layui-hide-sm layui-show-md-inline-block"><a href="/user/index">我发表的贴</a>
            </li>
{#            <li class="layui-hide-xs layui-hide-sm layui-show-md-inline-block"><a href="/user/index#collection">我收藏的贴</a>#}
{#            </li>#}
        </ul>

        <div class="fly-column-right layui-hide-xs">
{#            <span class="fly-search"><i class="layui-icon"></i></span>#}
            <a href="/jie/add" class="layui-btn">发表新帖</a>
        </div>
        <div class="layui-hide-sm layui-show-xs-block"
             style="margin-top: -10px; padding-bottom: 10px; text-align: center;">
            <a href="/jie/add" class="layui-btn">发表新帖</a>
        </div>
    </div>
</div>

<div class="layui-container">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md8">
            <div class="fly-panel" style="margin-bottom: 0;">

                <div class="fly-panel-title fly-filter">
                    <a href="/jie/dynamic" >综合</a>
                    <span class="fly-mid"></span>
                    <a href="/jie/dynamic/1">未结</a>
                    <span class="fly-mid"></span>
                    <a href="/jie/dynamic/2">已结</a>
                    <span class="fly-mid"></span>
                    <a href="/jie/dynamic/3">精华</a>

                </div>
                <ul class="fly-list" id="list_con">
                    {% for post_one in clicks_top_6 %}
                        <li>
                            <a href="/user/home/{{ post_one.user.id }}" class="fly-avatar">
                                <img src="{{ post_one.user.avatar_url }}"
                                     >
                            </a>
                            <h2>
                                <a class="layui-badge">{{ post_one.category.name }}</a>
                                <a href="/detail/{{ post_one.id }}">{{ post_one.title }}</a>
                            </h2>
                            <div class="fly-list-info">
                                <a href="/user/home/{{ post_one.user.id }}" link>
                                    <cite>{{ post_one.source }}</cite>
                                    {% if not post_one.user.credentials %}
                                        {#                <i class="iconfont icon-renzheng" title="认证信息：XXX"></i>#}
                                    {% else %}
                                        <i class="iconfont icon-renzheng"
                                           title="认证信息：{{ post_one.user.credentials }}"></i>
                                    {% endif %}
                                    {% if not post_one.user.vip_leven %}
                                        {#                <i class="layui-badge fly-badge-vip">VIP{{ post.user.vip_leven }}</i>#}
                                    {% else %}
                                        <i class="layui-badge fly-badge-vip">VIP{{ post_one.user.vip_leven }}</i>
                                    {% endif %}
                                </a>
                                <span>{{ post_one.create_time }}</span>

                                <span class="fly-list-kiss layui-hide-xs" title="悬赏飞吻"><i
                                        class="iconfont icon-kiss"></i> {{ post_one.fly_kiss }}</span>
                                <!--<span class="layui-badge fly-badge-accept layui-hide-xs">已结</span>-->
                                <span class="fly-list-nums">
                <i class="iconfont icon-pinglun1" title="回答"></i> {{ post_one.comments.count() }}
              </span>
                            </div>
                            <div class="fly-list-badge">
                                <!--<span class="layui-badge layui-bg-red">精帖</span>-->
                            </div>
                        </li>
                    {% endfor %}
                </ul>
{#                <div style="text-align: center">#}
{#                    <div class="laypage-main">#}
{#                        <a href="/jie/index" class="laypage-next">更多求解</a>#}
{#                    </div>#}
{#                </div>#}
            <div id="pagination" class="page"></div>
            </div>
        </div>
        <div class="layui-col-md4">
           <dl class="fly-panel fly-list-one">
                <dt class="fly-panel-title">本周最新</dt>
                {% for post_hot in time_Rank %}
                    <dd>
                        <a href="/detail/{{ post_hot.id }}">{{ post_hot.title }}</a>
{#                        <span><i class="iconfont icon-pinglun1"></i> {{ post_hot.comments.count() }}</span>#}
                    </dd>
                {% endfor %}
            </dl>
        </div>

    </div>

</div>


{#style="text-align: center"#}
<div class="fly-footer">
    <p><a href="#" target="_blank">Flask项目</a> 2020 &copy; <a href="#" target="_blank">zqy出品</a></p>
</div>

<script src="/static/res/layui/layui.js"></script>
<script src="/static/res/mods/index.js"></script>
<script src="/static/jquery-1.12.4.min.js"></script>
<script src="/static/jquery.form.min.js"></script>
<script src="/static/jquery.pagination.min.js"></script>
<script>
    layui.cache.page = 'jie';
    layui.cache.user = {
        username: '游客'
        , uid: -1
        , avatar: '/static/res/images/avatar/00.jpg'
        , experience: 83
        , sex: '男'
    };
    layui.config({
        version: "3.0.0"
        , base: '/static/res/mods/'
    }).extend({
        fly: 'index'
    }).use('fly');
</script>

</body>
</html>